Skip to content

Retry remote HTTP/2 internal errors - #232

Merged
samuel-williams-shopify merged 1 commit into
mainfrom
retry-remote-error
Jul 29, 2026
Merged

Retry remote HTTP/2 internal errors#232
samuel-williams-shopify merged 1 commit into
mainfrom
retry-remote-error

Conversation

@samuel-williams-shopify

@samuel-williams-shopify samuel-williams-shopify commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Map HTTP/2 StreamError(INTERNAL_ERROR) to Protocol::HTTP::RemoteError while waiting for response headers.
  • Preserve the original StreamError, including its HTTP/2 error code, as Exception#cause.
  • Retry RemoteError using Request#retry!, so only retry-safe methods with rewindable bodies are resent.
  • Require protocol-http ~> 0.66 for RemoteError.

The translation occurs in HTTP2::Client#read_response, where the protocol-specific response failure becomes the outcome of the abstract HTTP client call. This establishes the native cause chain without changing the low-level protocol-http2 callback lifecycle. Resets received after a response has already been returned remain visible while reading the response body and are not transparently retried.

Closes #231.

Testing

  • Focused retry and HTTP/2 mapping tests: 7 passed, 23 assertions
  • Full suite: 241 passed, 3 skipped, 33,560 assertions
  • RuboCop on changed Ruby files: no offenses

@samuel-williams-shopify
samuel-williams-shopify force-pushed the retry-remote-error branch 4 times, most recently from 3d97164 to c450c45 Compare July 29, 2026 05:34
@samuel-williams-shopify
samuel-williams-shopify merged commit 7a635cd into main Jul 29, 2026
34 of 40 checks passed
@samuel-williams-shopify
samuel-williams-shopify deleted the retry-remote-error branch July 29, 2026 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP/2: server RST_STREAM with INTERNAL_ERROR isn't covered by the existing retry mechanism

1 participant